package com.qf.card.dao;


import com.qf.card.pojo.BankCard;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

/****
 * @Author:shenkunlin
 * @Description:BankCard的Dao
 * @Date 2019/6/14 0:12
 *****/
public interface BankCardMapper extends Mapper<BankCard> {

    @Select("SELECT * FROM bank_card where user_id =#{id}")
    public List<BankCard> selectCardsByUserId(@Param("id")Integer Userid);


    //解冻银行卡
    @Update("UPDATE bank_card SET branch_state=1 WHERE pk_bank_id=#{id}")
    void bankCardUnFreeze(@Param("id") Integer id);

    //冻结银行卡
    @Update("UPDATE bank_card SET branch_state=0 WHERE pk_bank_id=#{id}")
    void bankCardFreeze(@Param("id") Integer id);

}
